package it.application.smoc;

import it.application.smoc.List.CustomizedListView;
import it.application.smoc.R.id;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class NaplesDelegation extends CustomWindow {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_naples_delegation);
        boolean loggato= getIntent().getBooleanExtra("it.application.smoc.Logged", false);
        if(loggato){mostraOpLoggato();}
        else{nascondiOpLoggato();}
    }

	@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_naples_delegation, menu);
        return true;
    }
    public void GoToDelegationBoard(View v){
    	Intent intent=new Intent(NaplesDelegation.this,DelegationBoardActivities.class);
    	startActivity(intent);
    }
    public void GoToDelegationActivities(View v)
    {
    	Intent intent=new Intent(NaplesDelegation.this,DelegationCouncilActivity.class);
    	startActivity(intent);
    }
    public void GoToRegisteredKnights(View v){
    	Intent intent=new Intent(NaplesDelegation.this,CustomizedListView.class);
    	startActivity(intent);
    }
    
	private void mostraOpLoggato() {
		((Button)findViewById(id.btnKnightsLady)).setVisibility(Button.VISIBLE);
	}
	
    private void nascondiOpLoggato() {
    	((Button)findViewById(id.btnKnightsLady)).setVisibility(Button.GONE);
	}
}
